package com.shd.edanpei.ui.adapter;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.webkit.WebView;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseViewHolder;
import com.shd.edanpei.R;
import com.shd.edanpei.base.BaseQuickImageAdapter;
import com.shd.edanpei.bean.MessageModel;

/**
 * Created by mc on 2018/9/19.
 * yang-wen-wen
 */

public class DynamicsAdapter extends BaseQuickImageAdapter<MessageModel> {

    public DynamicsAdapter(Context context) {
        super(context, R.layout.item_dynamics);
    }

    @Override
    protected void convert(BaseViewHolder helper, MessageModel item) {
        helper.setText(R.id.time, item.getCreateTime())
                .setText(R.id.title, item.getTitle())
                .setText(R.id.intro, item.getSummary());

        mLoadImgCtrl.getGlide().load(item.getPicTure()).into((ImageView) helper.getView(R.id.picture));
        //((WebView)helper.getView(R.id.intro)).loadData(item.getContent(),"","utf-8");
    }

}
